@extends('layout.index')
@section('title','用户修改')
@section('content')
	<div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">用户修改</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>

	<div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
            @if (count($errors) > 0)
            <div class="alert alert-danger">
            <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
            </ul>
            </div>
            @endif
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6">
                        <form role="form" action="{{url('admin/uadd/update')}}" method="post" enctype="multipart/form-data">
                            <div class="form-group">
                                <input type="hidden" value="{{$user->id}}" name="id">
                                <label>用户名:</label>
                                <input type="text" value="{{$user->username}}" name="username" class="form-control">
                                <p class="help-block"></p>
                            </div>
                            <div class="form-group">
                                <label>邮箱:</label>
                                <input type="text" value="{{$user->email}}" name="email" class="form-control">
                                <p class="help-block"></p>
                            </div>
                            <div class="form-group">
                                <label>手机号:</label>
                                <input type="text" value="{{$user->phone}}" name="phone" class="form-control">
                                <p class="help-block"></p>
                            </div>
                            <div class="form-group">
                                <label>头像:</label>
                                <img width="50px" src="{{$user->pic}}" alt="">
                                <input type="file" name="pic">
                            </div>
                            {{csrf_field()}}
                            <button class="btn btn-primary" type="submit">提交</button>
                            <button class="btn btn-danger" type="reset">重置</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection